<template>
  <!-- 车源管理 -->
  <view class="container" id="commcon">
    <!-- 分享详情海报弹窗 -->
    <view class="popup-box" v-if="haibaotrue">
      <view class="popopwubj">
        <poster-share></poster-share>
      </view>
    </view>
    <u-toast ref="uToast" />
    <view id="comf" class="header">
      <u-tabs-swiper height="115" bar-width="78" inactive-color="#666666" bar-height="10" active-color="#FBB000" ref="uTabs"
        :list="titleList" :current="current" @change="tabsChange" :is-scroll="false" style="width: 560rpx;"></u-tabs-swiper>
      <!-- 分类 -->
      <view class="fen" @click="fenlei">
        <view class="fenwenzi">{{stateText}}</view>
        <u-icon style="margin-left: 10rpx;" name="arrow-down-fill" color="#9A9A9A" size="20rpx"></u-icon>
      </view>
    </view>
    <!-- <page-loading :show="showPage" mode='if'> -->
      <!-- 下方滑块 -->
      <swiper style="min-height: 84vh;" :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish">
        <swiper-item class="swiper-item" v-for="(item1, index1) in tabs" :key="index1">
          <scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="onreachBottom">
           <view class="defaultMap" v-if="pagelistull">
              <image src="https://files.yzsheng.com/bussiness/imgs/tu@2x.png"></image>
              <view class="texna">
                {{defaultMapTitle}}
              </view>
            </view>
            <view class="guan-item boxS" v-for="(item,index) in pageList" :key="item.id" :class="index == (pageList.length - 1) ? 'active' : ''">
              <view class="box-top" @click="preview(item)">
                <view class="box-left">
                  <image :src="item.goodimg + '!idx'"></image>
                  <view v-show="item.shelve_Status===1" class="zhez">已下架</view>
                </view>
                <view class="box-right">
                  <view class="box-name text-line2">{{item.car_Type_Name}}{{item.configuration_Name}}</view>
                  <view class="box-right-item">
                    <view class="text-line">渠道价：<text style="color:#EB5C02;font-weight: bold;">{{item.bus_Price}}</text></view>
                    <view class="text-line">零售价：<text style="color:#EB5C02;font-weight: bold;">{{item.client_Price}}</text></view>
                  </view>
                  <view class="box-right-item">
                    <view class="text-line">总销量：<text>{{item.sales}}</text></view>
                    <view class="text-line">添加人：<text>{{item.accountName}}</text></view>
                  </view>

                  <view class="box-right-item">
                    <view class="text-line">上架时间：<text>{{item.shelve_Time}}</text></view>
                    <view></view>
                  </view>
                </view>
              </view>
              <view class="box-bottom">
                <view class="box-item" style="border-right: 1rpx solid #EEEEEE;" @tap="goYedit(item)">
                  <i-icon icon="iconbianji" type="multiple" size="40rpx"></i-icon>
                  <text class="wztex">编辑</text>
                </view>
                <view class="box-item" v-show="item.shelve_Status===1" style="border-right: 1rpx solid #EEEEEE;" @click="shagnjiaClick(item)">
                  <i-icon icon="iconshangjia1" type="multiple" size="40rpx"></i-icon>
                  <text class="wztex">上架</text>
                </view>
                <view class="box-item" v-show="item.shelve_Status===0" style="border-right: 1rpx solid #EEEEEE;" @click="xiajiaClick(item)">
                  <i-icon icon="iconxiajia" type="multiple" size="40rpx"></i-icon>
                  <text class="wztex">下架</text>
                </view>
                <view class="box-item" @click="fenx(item)">
                  <!-- @tap="Core.showToast()" -->
                  <i-icon icon="iconfenxiang1" type="multiple" size="40rpx"></i-icon>
                  <text class="wztex">分享</text>
                </view>
              </view>
            </view>
            <view style="height: 5rpx;"></view>
          </scroll-view>
        </swiper-item>
      </swiper>

    <!-- </page-loading> -->
    <view class="footer">
      <view class="footerplgl" @click="gobatch">
        批量管理
      </view>
      <view class="fabucheyuan" @click="goYv2">
        发布车源
      </view>
    </view>
    <!-- 上架 选择车源有效期-->
    <u-popup v-model="showsjrq" mode="bottom" border-radius="30">
      <view class="hgzbox" style="height: 690rpx;">
        <view class="xsquy" style="border-bottom: 0px solid #EEEEEE;">
          选择车源有效期
        </view>
        <view class="sxiaboxs flex flex-jc-sa">
          <view class="long flex flex-ai-c" @click="valclick(index)" v-for="(item,index) in changqili" :key="index">
            <view class="iconcs">
              <i-icon v-show="!item.check" icon="icontuoyuan" type="single" size="40rpx" color="#999999"></i-icon>
              <i-icon v-show="item.check" icon="icongouxuan" type="multiple" size="40rpx"></i-icon>
            </view>
            <view class="longtext">
              {{item.name}}
            </view>
          </view>
        </view>
        <u-picker class="timessss" style="margin-top:90px !important;" confirm-color="#343434" cancel-color="#FFE23E"
          :mode="modesc" :defaultTime="Production" v-model="showsjrq" :params="paramssc" @confirm="validPeriodClick"></u-picker>
      </view>
    </u-popup>

    <u-popup v-model="show" mode="bottom" border-radius="30">
      <view class="pop-title">分类</view>
      <view class="pop-item" @click="fenClass(item)" v-for="(item,index) in allstattext" :key="index">{{item.name}}</view>
    </u-popup>

    <u-modal v-model="showXiajia" :mask-close-able="true" title="温馨提示" :title-style="{fontWeight: 'bold'}"
      :show-confirm-button="false">
      <view class="slot-content" style="padding-bottom: 50rpx;">
        <view class="mod-tis">是否确认下架此商品？</view>
        <view class="mod-btn">
          <view class="footerplgl" @click="showXiajia=false">
            取消
          </view>
          <view class="fabucheyuan" @click="footerBtn(1)">
            确认下架
          </view>
        </view>
      </view>
    </u-modal>
  </view>
</template>

<script src="./managementOptions.js"></script>
<style lang="scss" scoped>
  @import './managementOptions.scss';
</style>
